<template>
  <div class="logo-component" :class="{ 'is-large': large }">
    <router-link :to="to">
      <svg class="brand-logo" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
        <circle cx="50" cy="50" r="46" fill="#fff" stroke="var(--primary-color)" stroke-width="4" />
        <path d="M30 35 L45 70 L55 70 L70 35 M40 55 L60 55" fill="none" stroke="var(--primary-color)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
      </svg>
      <span v-if="showText" class="brand-name">{{ text }}</span>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'Logo',
  props: {
    to: {
      type: String,
      default: '/'
    },
    text: {
      type: String,
      default: '易凡科技'
    },
    showText: {
      type: Boolean,
      default: true
    },
    large: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style lang="scss" scoped>
.logo-component {
  a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
  }
  
  .brand-logo {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
    
    &:hover {
      transform: rotate(5deg) scale(1.05);
    }
  }
  
  .brand-name {
    margin-left: 10px;
    font-size: 18px;
    font-weight: 600;
  }
  
  &.is-large {
    .brand-logo {
      width: 60px;
      height: 60px;
    }
    
    .brand-name {
      font-size: 24px;
    }
  }
}

@media (max-width: 768px) {
  .logo-component {
    .brand-logo {
      width: 35px;
      height: 35px;
    }
    
    .brand-name {
      font-size: 16px;
    }
    
    &.is-large {
      .brand-logo {
        width: 50px;
        height: 50px;
      }
      
      .brand-name {
        font-size: 20px;
      }
    }
  }
}
</style> 